Index: sys/i386/ibcs2/ibcs2_stat.c
===================================================================
RCS file: /home/ncvs/src/sys/i386/ibcs2/ibcs2_stat.c,v
retrieving revision 1.23
diff -c -p -r1.23 ibcs2_stat.c
*** sys/i386/ibcs2/ibcs2_stat.c	22 Jun 2003 08:41:42 -0000	1.23
--- sys/i386/ibcs2/ibcs2_stat.c	7 Aug 2003 17:50:44 -0000
*************** cvt_statfs(sp, buf, len)
*** 83,88 ****
--- 83,92 ----
  {
  	struct ibcs2_statfs ssfs;
  
+ 	if (len < 0)
+ 		return (EINVAL);
+ 	else if (len > sizeof(ssfs))
+ 		len = sizeof(ssfs);
  	bzero(&ssfs, sizeof ssfs);
  	ssfs.f_fstyp = 0;
  	ssfs.f_bsize = sp->f_bsize;
